package cn.yl.vod.server.controller;

import cn.yl.api.server.result.Result;
import cn.yl.vod.server.service.VodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hyl
 */
@RestController
@RequestMapping("vod")
public class VodController {
    @Autowired
    private VodService vodService;

    @PostMapping("playerUrl")
    public Result getPlayerUrlByVodId(String vodId) throws Exception {
        String playAuth = vodService.getVodUrlByVodId(vodId);
        return Result.ok().setData("item",playAuth);
    }
}
